//
// Created by Administrator on 25-6-30.
//

#ifndef DAC_H
#define DAC_H
#include "main.h"
#define DACON 1
#define DACOFF 0
struct DACOBJ {
    DAC_HandleTypeDef *hdac;
    uint32_t Channel;
};
#define _DACOBJ struct DACOBJ
void DAC_SetStatus(_DACOBJ* obj, uint8_t status);
void DAC_OutArray(_DACOBJ* obj, uint16_t* arr, uint32_t len, uint32_t time);
void DAC_OutArray_DMA(_DACOBJ* obj, TIM_HandleTypeDef * TIMx,  uint16_t* arr, uint32_t len);
void DAC_OutV(_DACOBJ* obj, uint16_t v, uint32_t time);
#endif //DAC_H
